<?php
 /*******************************************************************************
 * @filename: deafault.ctp
 *
 * @author: immer_baldos
 *
 * @description: root page
 *
 * @history:
 *
 *   VERSION   DATE                   BY          NOTES
 *  ---------------------------------------------------------------
 *     1.0     September  9, 2009     immer       initial bake
 *
 *     2.0     September 16, 2009     immer       add login/logout display logic
 *                                                customize image
 *
 ******************************************************************************/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<?php echo $html->charset(); ?>
	<title>
		<?php __('MSI-ECS'); ?>
		<?php echo $title_for_layout; ?>
	</title>
    <?php

		echo $html->meta('icon');

		echo $html->css('cake.generic');

		echo $scripts_for_layout;
	?>

</head>
<body>
	<div id="container">
		<div id="header">
			<h1>
			    <?php

                    echo $html->image("cake.icon.gif", array("alt" => "Home",'url' => '/'));
                    echo '&nbsp;&nbsp;&nbsp;&nbsp;';
                    if(!empty($_SESSION['Auth']['User']['username'])){
                        echo $html->link(__(('Logout '.$_SESSION['Auth']['User']['username']),true), array('controller' => 'users', 'action' => 'logout'));
                    }else{
                        echo $html->link(__('Login ',true), array('controller' => 'users', 'action' => 'login'));
                    }
                ?>

			</h1>
		</div>
		<div id="content">

			<?php $session->flash(); ?>

			<?php echo $content_for_layout; ?>

		</div>
		<div id="footer">
			<?php echo $html->link(
					$html->image('cake.power.gif', array('alt'=> __("CakePHP: the rapid development php framework", true), 'border'=>"0")),
					'http://www.cakephp.org/',
					array('target'=>'_blank'), null, false
				);
			?>
		</div>
	</div>
	<?php echo $cakeDebug; ?>
</body>
</html>